﻿<%@ Page Title="<%$ Concat:UIStrings.EditResourcesOnline,' &raquo; ResourceBlender.NET' %>" Language="C#" MasterPageFile="~/Layout.master" AutoEventWireup="true" CodeFile="ResourcesOnline.aspx.cs" Inherits="ResourcesOnline" EnableEventValidation="false" ValidateRequest="false" %>
<%@ MasterType VirtualPath="~/Layout.master" %>
<%@ Register TagPrefix="L49" Namespace="Lime49.UI" %>
<%@ Register TagPrefix="L49" TagName="ApplicationSelector" Src="~/ApplicationSelector.ascx" %>
<%@ Register TagPrefix="L49" TagName="InlineNav" Src="~/InlineNav.ascx" %>

<asp:Content ID="contentHead" ContentPlaceHolderID="head" Runat="Server">
    <link rel="Stylesheet" type="text/css" href="css/spreadsheet.css" />
    <!--[if IE]>
    <link rel="Stylesheet" type="text/css" href="css/ie-spreadsheet.css" />
    <![endif]-->
</asp:Content>
<asp:Content ID="contentMain" ContentPlaceHolderID="cntMain" Runat="Server">
    <asp:ScriptManager ID="scrUpdateLanguages" runat="server">
    </asp:ScriptManager>
    <asp:MultiView ID="mltMain" runat="server" ActiveViewIndex="0">
        <asp:View ID="viwNoApps" runat="server">
            <h1><asp:Literal runat="server" Text="<%$ Resources:UIStrings, EditResources %>" /></h1>
            <p><asp:Literal ID="litAddAppLink" runat="server" /></p>
        </asp:View>
        <asp:View ID="viwSelectResources" runat="server">
            <h1><asp:Literal runat="server" Text="<%$ Resources:UIStrings, EditResources %>" /></h1>
            <div class="breadcrumbs">
                <asp:HyperLink ID="lnkNavHome" runat="server" NavigateUrl="~/Default.aspx">ResourceBlender.NET</asp:HyperLink> &gt; <asp:HyperLink ID="lnkNavResources" runat="server" NavigateUrl="~/ResourcesMain.aspx" Text="<%$ Resources:UIStrings, Resources %>" /> &gt; <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:UIStrings, EditResourcesOnline %>" />
            </div>
            <div class="niceform">
                <L49:ApplicationSelector ID="appSelector" runat="server" />
                <div class="actions">
                    <asp:Button ID="btnEditResources" runat="server" Text="<%$ Resources:UIStrings, EditResourcesOnline %>" 
                        CssClass="uniformbutton doublewidth btnEdit" OnClick="btnEditResources_Click" />
                </div>
            </div>
        </asp:View>
        <asp:View ID="viwManageResources" runat="server">
            <asp:ObjectDataSource ID="dsMain" runat="server" TypeName="ResourceBlender.DAL.ResourceBlenderDAL" SelectMethod="GetResources"
                 OnSelecting="dsMain_Selecting" OnSelected="dsMain_Selected">
                <SelectParameters>
                    <asp:ControlParameter ControlID="appSelector" PropertyName="SelectedApplicationID" Name="applicationId" Type="String" />
                    <asp:ControlParameter ControlID="appSelector" PropertyName="SelectedBundles" Name="bundleIds" Type="Object" />
                    <asp:Parameter Name="languageCodes" Type="Object" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="dsBundles" runat="server" TypeName="ResourceBlender.DAL.ResourceBlenderDAL" SelectMethod="GetBundles">
                <SelectParameters>
                    <asp:ControlParameter ControlID="appSelector" PropertyName="SelectedApplicationID" Name="applicationId" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="dsResourceIDs" runat="server" TypeName="ResourceBlender.DAL.ResourceBlenderDAL" SelectMethod="GetResourcesTrimmed">
                <SelectParameters>
                    <asp:Parameter Name="language" Type="String" DefaultValue="en-GB" />
                    <asp:Parameter Name="numCharacters" Type="Int32" DefaultValue="15" />
                    <asp:Parameter Name="trimUsingSql" Type="Boolean" DefaultValue="true" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <div id="fullsizeholder" class="ssFullSize" runat="server">
                <h1><asp:Literal ID="lblEditingResourcesFor" runat="server" /></h1>
                <div class="breadcrumbs">
                    <asp:HyperLink ID="lnkNavHomeFull" runat="server" NavigateUrl="~/Default.aspx">ResourceBlender.NET</asp:HyperLink> &gt; <asp:HyperLink ID="lnkNavResourcesFull" runat="server" NavigateUrl="~/ResourcesMain.aspx" Text="<%$ Resources:UIStrings, Resources %>" /> &gt; <asp:LinkButton ID="lnkNavEditOnline" runat="server" OnClick="lnkNavEditOnline_Click" Text="<%$ Resources:UIStrings, EditResourcesOnline %>" /> &gt; <asp:Label ID="lblBreadcrumbEnd" runat="server" />
                </div>
                <div style="float:left">
                    <asp:UpdateProgress ID="upgGrdResources" runat="server" 
                        AssociatedUpdatePanelID="updGrdResources" 
                        DisplayAfter="100">
                        <ProgressTemplate>
                            <div class="centered"><asp:Image ID="imgLoadingResource" runat="server" ImageUrl="~/images/ajax-loader.gif" AlternateText="<%$ Resources:UIStrings, Loading %>" /></div>
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                </div>
                <div id="inlinenav">
                    <asp:LinkButton ID="lnkExpandScreen" runat="server" CssClass="lnkContract" 
                        OnClientClick="return toggleFullWindow(this);" 
                        OnClick="lnkExpandScreen_Click" CausesValidation="False" Text="<%$ Resources:UIStrings, ContractNormalSize %>"
                        EnableViewState="False"></asp:LinkButton>
                    <ul>
                        <li class="btnAddBulk" id="lnkBulk"><a href="#bulkadd" id="navLnkAddBulk"><asp:Literal runat="server" Text="<%$ Resources:UIStrings, BulkAddElements %>" /></a></li>
                    </ul>
                    <L49:InlineNav runat="server" />
                </div>
                <div class="clear"></div>
                <asp:UpdatePanel ID="updGrdResources" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <div class="niceform nicefieldset">
                            <h2><asp:LinkButton ID="lnkToggleFilters" runat="server" ToolTip="<%$ Resources:UIStrings, ToggleFilters %>" CausesValidation="false" Text="<%$ Resources:UIStrings, Filters %>" OnClick="lnkToggleFilters_Click">
                                <asp:Image ID="imgToggleFilters" runat="server" ToolTip="<%$ Resources:UIStrings, ToggleFilters %>" ImageUrl="~/images/arrow_down.gif" />
                            </asp:LinkButton></h2>
                            <asp:Panel ID="pnlFiltersCollapsable" runat="server" CssClass="collapsed">
                                <div class="formrow">
                                    <asp:Label ID="lblBundleFilter" runat="server" Text="<%$ Resources:UIStrings, BundleName %>" AssociatedControlID="txtBundleFilter" EnableViewState="false" />
                                    <asp:DropDownList ID="cboBundleFilter" runat="server" EnableViewState="false">
                                        <asp:ListItem Text="<%$ Resources:UIStrings, Contains %>" Selected="True" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, StartsWith %>" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, EndsWith %>" />
                                    </asp:DropDownList>
                                    <asp:TextBox ID="txtBundleFilter" runat="server" EnableViewState="false"></asp:TextBox>
                                </div>
                                 <div class="formrow">
                                    <asp:Label ID="lblElementFilter" runat="server" Text="<%$ Resources:UIStrings, ElementName %>" AssociatedControlID="txtElementFilter" />
                                    <asp:DropDownList ID="cboElementFilter" runat="server">
                                        <asp:ListItem Text="<%$ Resources:UIStrings, Contains %>" Selected="True" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, StartsWith %>" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, EndsWith %>" />
                                    </asp:DropDownList>
                                    <asp:TextBox ID="txtElementFilter" runat="server"></asp:TextBox>
                                </div>
                                 <div class="formrow">
                                    <asp:Label ID="lblElementCommentFilter" runat="server" Text="<%$ Resources:UIStrings, ElementComment %>" AssociatedControlID="txtElementCommentFilter" />
                                    <asp:DropDownList ID="cboElementCommentFilter" runat="server">
                                        <asp:ListItem Text="<%$ Resources:UIStrings, Contains %>" Selected="True" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, StartsWith %>" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, EndsWith %>" />
                                    </asp:DropDownList>
                                    <asp:TextBox ID="txtElementCommentFilter" runat="server"></asp:TextBox>
                                </div>
                                 <div class="formrow">
                                    <asp:Label ID="lblResourceCommentFilter" runat="server" Text="<%$ Resources:UIStrings, ResourceComment %>" AssociatedControlID="txtResourceCommentFilter" />
                                    <asp:DropDownList ID="cboResourceCommentFilter" runat="server">
                                        <asp:ListItem Text="<%$ Resources:UIStrings, Contains %>" Selected="True" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, StartsWith %>" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, EndsWith %>" />
                                    </asp:DropDownList>
                                    <asp:TextBox ID="txtResourceCommentFilter" runat="server"></asp:TextBox>
                                </div>
                                 <div class="formrow">
                                    <asp:Label ID="lblTranslationFilter" runat="server" Text="<%$ Resources:UIStrings, TranslationFor %>" AssociatedControlID="txtTranslationFilter" />
                                    <asp:DropDownList ID="cboTranslationFilterLanguage" runat="server">
                                        <asp:ListItem Text="<%$ Resources:UIStrings, SelectLanguage %>" Selected="True"></asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="cboTranslationFilter" runat="server">
                                        <asp:ListItem Text="<%$ Resources:UIStrings, Contains %>" Selected="True" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, StartsWith %>" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, EndsWith %>" />
                                        <asp:ListItem Text="<%$ Resources:UIStrings, IsBlank %>" />
                                    </asp:DropDownList>
                                    <asp:TextBox ID="txtTranslationFilter" runat="server"></asp:TextBox>
                                </div>
                                <div class="formrow block actions">
                                    <asp:Button ID="btnApplyFilters" runat="server" Text="<%$ Resources:UIStrings, ApplyFilters %>" 
                                        CssClass="uniformbutton btnFilter" EnableViewState="False" 
                                        OnClick="btnApplyFilters_Click" ValidationGroup="filters" />
                                    <asp:Button ID="btnRemoveFilters" runat="server" Text="<%$ Resources:UIStrings, RemoveFilters %>" 
                                        CssClass="uniformbutton btnUnfilter" EnableViewState="False" 
                                        OnClick="btnRemoveFilters_Click" ValidationGroup="filters" />
                                </div>
                            </asp:Panel>
                        </div><!-- filters form -->
                        <L49:BetterGridView ID="grdResources" runat="server" AllowPaging="True" 
                            AllowSorting="True" AutoGenerateColumns="true" CssClass="nicetable"
                            DataSourceID="dsMain" SelectedRowStyle-CssClass="ssRowSelected"
                            Width="100%" DataKeyNames="applicationid,bundlename,elementname"
                            OnRowCommand="grd_RowCommand"
                            OnRowDatabound="grd_RowDataBound"
                            OnPageIndexChanging="grd_PageIndexChanging"
                            OnPreRender="grd_PreRender"
                            OnRowEditing="grd_RowEditing"
                            OnSorting="grd_Sorting"
                            PageSize="15">
                            <PagerSettings PageButtonCount="8" Mode="NumericFirstLast" Position="TopAndBottom" />
                            <HeaderStyle CssClass="excelHead" />
                            <RowStyle CssClass="even" />
                            <AlternatingRowStyle CssClass="alt" />
                            <PagerStyle CssClass="pager" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <%# Container.DataItemIndex +1 %>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="ssRowLabel" HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField SortExpression="bundlename" HeaderText="<%$ Resources:UIStrings, Bundle %>">
                                    <ItemTemplate>
                                        <asp:Label ID="lblBundleName" runat="server" Text='<%# Eval("bundlename") %>'></asp:Label>
                                    </ItemTemplate>       
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="cboBundleName"  runat="server" ValidationGroup="editelement" DataSourceID="dsBundles" DataTextField="Name" DataValueField="BundleID" />
                                    </EditItemTemplate> 
                                    <ItemStyle CssClass="ssCell" />
                                </asp:TemplateField>
                                <asp:TemplateField SortExpression="elementname" HeaderText="<%$ Resources:UIStrings, Element %>">
                                    <ItemTemplate>
                                        <asp:Label ID="lblElementName" runat="server" Text='<%# Utils.TrimText(Eval("elementname").ToString(), 30) %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lblElementNameDesc" runat="server" Text="<%$ Resources:UIStrings, ElementName %>" AssociatedControlID="txtElementName" EnableViewState="False" CssClass="block" />
                                        <asp:TextBox ID="txtElementName" runat="server" Text='<%# Bind("elementname") %>' EnableViewState="False" ValidationGroup="editelement" CssClass="block" />
                                        <asp:Label ID="lblElementComment" runat="server" Text="<%$ Resources:UIStrings, Comment %>" AssociatedControlID="txtElementComment" EnableViewState="False" CssClass="block" />
                                        <asp:TextBox ID="txtElementComment" runat="server" Text='<%# Bind("elementcomment") %>' TextMode="MultiLine" EnableViewState="False" ValidationGroup="editelement" CssClass="block" />
                                        <asp:HyperLink ID="btnEditPO" runat="server" 
                                                Text='<%# string.Format(Resources.UIStrings.ShowThePOEditorNum, Eval("id")) %>' 
                                                ToolTip='<%# string.Format(Resources.UIStrings.ShowThePOEditorNum, Eval("id")) %>' 
                                                NavigateUrl="#"
                                                CssClass="btnPOEdit" />
                                        <asp:RequiredFieldValidator SetFocusOnError="true" Display="Dynamic" ID="vldEditElementName" runat="server" 
                                            ErrorMessage="<%$ Resources:Errors, ElementNameRequired %>" ControlToValidate="txtElementName" ValidationGroup="editelement"></asp:RequiredFieldValidator>
                                    </EditItemTemplate>
                                    <ItemStyle CssClass="ssCell" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="<%$ Resources:UIStrings, Commands %>">
                                    <ItemTemplate>
                                        <asp:MultiView ID="mltActions" runat="server" ActiveViewIndex="0">
                                            <asp:View ID="viwSave" runat="server">
                                            <div class="centered">
                                                <asp:ImageButton ID="btnEdit" runat="server" 
                                                    ToolTip='<%# string.Format(Resources.UIStrings.EditName, Eval("elementname")) %>' 
                                                    EnableViewState="False"
                                                    CommandName="edit" 
                                                    ImageUrl="~/images/edit.png" />
                                                <asp:ImageButton ID="btnDelete" runat="server" 
                                                    ToolTip='<%# string.Format(Resources.UIStrings.DeleteElementNum, Eval("id")) %>' 
                                                    CommandName="deleteelement" 
                                                    CommandArgument='<%# Eval("id") %>'
                                                    ImageUrl="~/images/delete.png" />
                                            </div>
                                        </asp:View>
                                            <asp:View ID="viwConfirmDelete" runat="server">
                                                <div class="centered">
                                                    <asp:Label ID="lblConfirmDelete" runat="server" Text='<%# string.Format(Resources.UIStrings.DeleteElementNamePrompt, Eval("elementname")) %>' CssClass="block"></asp:Label>
                                                    <asp:Button ID="btnConfirmDelete" runat="server" Text="<%$ Resources:UIStrings, Delete %>" CommandName="confirmdelete" CommandArgument='<%# Eval("id") %>' ValidationGroup="deleteresource" CssClass="uniformbutton btnConfirm" />
                                                    <asp:Button ID="btnCancelDelete" runat="server" Text="<%$ Resources:UIStrings, Cancel %>" CommandName="canceledit" ValidationGroup="deleteresource" CssClass="uniformbutton btnCancel" />
                                                </div>
                                            </asp:View>
                                        </asp:MultiView>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lblResourceIdDesc" runat="server" Text="<%$ Resources:UIStrings, ResourceID %>" EnableViewState="False" AssociatedControlID="cboResourceID" CssClass="block" />
                                        <asp:DropDownList ID="cboResourceID" runat="server" ValidationGroup="editelement" CssClass="block" OnSelectedIndexChanged="cboResourceID_SelectedIndexChanged" DataSourceID="dsResourceIDs" DataTextField="Value" DataValueField="Key"/>
                                        <asp:Button ID="btnChangeResource"  Visible="false" runat="server" Text="<%$ Resources:UIStrings, ChangeResource %>" CommandName="changeresource" EnableViewState="False" />
                                        <asp:Label ID="lblResourceComment" runat="server" Text="<%$ Resources:UIStrings, Comment %>" AssociatedControlID="txtResourceComment" EnableViewState="False" CssClass="block" />
                                        <asp:TextBox ID="txtResourceComment" runat="server" Text='<%# Bind("resourcecomment") %>' TextMode="MultiLine" EnableViewState="False" ValidationGroup="editelement" CssClass="block" />
                                        <asp:Label ID="lblError" runat="server" CssClass="block error"/>
                                        <asp:Button ID="btnDeleteElement" runat="server" Text="<%$ Resources:UIStrings, DeleteElement %>" CommandName="deleteelement" CommandArgument='<%# Eval("id") %>' ValidationGroup="editelement" CssClass="block uniformbutton btnDelete doublewidth" />
                                        <asp:Button ID="btnSave" runat="server" Text="<%$ Resources:UIStrings, Save %>" CommandName="saveresource" CommandArgument='<%# Eval("id") %>' ValidationGroup="editelement" ToolTip='<%# string.Format(Resources.UIStrings.SaveResourceAssignName, Eval("elementname")) %>' CssClass="uniformbutton btnSave" />
                                        <asp:Button ID="btnCancel" runat="server" Text="<%$ Resources:UIStrings, Cancel %>" CommandName="canceledit" ValidationGroup="editresource" CssClass="uniformbutton btnCancel" />
                                    </EditItemTemplate>
                                    <ItemStyle CssClass="ssCell" />
                                </asp:TemplateField>
                            </Columns>
                        </L49:BetterGridView>
                        <asp:Label ID="lblNoMatching" runat="server" Text="<%$ Resources:UIStrings, NoMatchingElements %>" CssClass="noElements" />
                        <div class="niceform nicefieldset" id="frmAdd">
                            <h2><asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:UIStrings, AddElement %>" /></h2>
                            <asp:HyperLink ID="lnkAddBulk" runat="server" 
                                        Text="<%$ Resources:UIStrings, BulkAddElements %>"
                                        ToolTip="<%$ Resources:UIStrings, BulkAddElements %>"
                                        NavigateUrl="#bulkadd"
                                        CssClass="btnAddBulk" />
                            <fieldset>
                                <legend><asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:UIStrings, Element %>" /></legend>
                                <div class="formrow block">
                                    <asp:Label ID="lblAddBundleName" runat="server" AssociatedControlID="cboAddBundleName" Text="<%$ Resources:UIStrings, BundleName %>" />
                                    <asp:DropDownList ID="cboAddBundleName" runat="server" ValidationGroup="addelement" DataSourceID="dsBundles" DataTextField="Name" DataValueField="BundleID">
                                    </asp:DropDownList>
                                </div>
                                <div class="formrow block">
                                    <asp:Label ID="lblAddElementName" runat="server" AssociatedControlID="txtAddElementName" Text="<%$ Resources:UIStrings, ElementName %>" />
                                    <asp:TextBox ID="txtAddElementName" runat="server" EnableViewState="false" ValidationGroup="addelement"></asp:TextBox>
                                    <asp:Label ID="lblAddError" runat="server" CssClass="error" Visible="false"></asp:Label>
                                    <asp:RequiredFieldValidator SetFocusOnError="true" ID="vldAddElementName" runat="server"
                                         ErrorMessage="<%$ Resources:Errors, ElementNameRequired %>" ControlToValidate="txtAddElementName" ValidationGroup="addelement"/>
                                </div>
                                <div class="formrow block">
                                    <asp:Label ID="lblAddElementComment" runat="server" Text="<%$ Resources:UIStrings, ElementComment %>" ToolTip="<%$ Resources:UIStrings, ElementCommentDesc %>"  AssociatedControlID="txtAddElementComment" EnableViewState="False" />
                                    <asp:TextBox ID="txtAddElementComment" runat="server" TextMode="MultiLine" ValidationGroup="addelement" CssClass="floatLeft" />
                                    <asp:HyperLink ID="btnAddEditPO" runat="server" 
                                        Text="<%$ Resources:UIStrings, ShowThePOeditor %>"
                                        ToolTip="<%$ Resources:UIStrings, ShowThePOeditor %>"
                                        NavigateUrl="#"
                                        CssClass="btnPOEdit" />
                                </div>
                            </fieldset>
                            <asp:Panel ID="pnlAddedElement" runat="server" Visible="false" CssClass="successDiv">
                                <asp:Literal ID="litAddedElement" runat="server" />
                            </asp:Panel>
                            <fieldset>
                                <legend><asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:UIStrings, Resource %>" /></legend>
                                <div class="formrow block">
                                    <asp:Label ID="lblAddResourceID" runat="server" Text="<%$ Resources:UIStrings, ResourceID %>" AssociatedControlID="cboAddResourceID" EnableViewState="False"></asp:Label>
                                    <asp:DropDownList ID="cboAddResourceId" runat="server" AutoPostBack="true" DataSourceID="dsResourceIDs" DataTextField="Value" DataValueField="Key"
                                        OnSelectedIndexChanged="ChangeAddDisplayedResource" ValidationGroup="addelement">
                                    </asp:DropDownList>
                                </div>
                                <div class="formrow block">
                                    <asp:Label ID="lblAddResourceComment" runat="server" Text="<%$ Resources:UIStrings, ResourceComment %>" ToolTip="<%$ Resources:UIStrings, ResourceCommentDesc %>ResourceCommentDesc" AssociatedControlID="txtAddResourceComment" EnableViewState="False" />
                                    <asp:TextBox ID="txtAddResourceComment" runat="server" TextMode="MultiLine" EnableViewState="False" ValidationGroup="addelement"></asp:TextBox>
                                </div>
                                <asp:table id="tblAddResource" CssClass="addresource" runat="server">
                                    <asp:TableHeaderRow Visible="false">
                                        <asp:TableHeaderCell Text="<%$ Resources:UIStrings, Language %>" />
                                        <asp:TableHeaderCell Text="<%$ Resources:UIStrings, Resource %>" />
                                        <asp:TableHeaderCell Text="<%$ Resources:UIStrings, Actions %>" />
                                    </asp:TableHeaderRow>
                                </asp:table>
                                <div class="formrow block actions">
                                    <asp:Button ID="btnAddElement" runat="server" Text="<%$ Resources:UIStrings, AddElement %>" 
                                        CssClass="uniformbutton btnAdd" EnableViewState="False" 
                                        OnClick="btnAddElement_Click" ValidationGroup="addelement" />
                                </div>
                            </fieldset>
                        </div><!--add form-->
                        <div id="bulkadd" class="niceform nicefieldset">
                            <h2>
                                <a href="#bulkadd" name="bulkadd" class="btnClose">Close</a>
                                <asp:Literal runat="server" Text="<%$ Resources:UIStrings, BulkAddElements %>" />
                            </h2>
                            <div id="bulktxt">
                                <div class="formrow block">
                                    <label for="txtTranslation"><asp:Literal runat="server" Text="<%$ Concat:UIStrings.Translation, ' 1' %>" /></label>
                                    <textarea id="txtBulk1" name="txtBulk1" rows="5" cols="40" class="wide"></textarea>
                                </div>
                            </div>
                            
                            <div class="formrow block">
                                <asp:Label ID="lblBulkLanguage" runat="server" Text="<%$ Resources:UIStrings, TheseTranslationsAre %>" AssociatedControlID="cboBulkLanguage" EnableViewState="False" />
                                <asp:DropDownList ID="cboBulkLanguage" runat="server" ValidationGroup="bulkadd" DataTextField="Key" DataValueField="Value" />
                            </div>
                            
                            <div class="formrow block">
                                <asp:Label ID="lblBulkBundle" runat="server" Text="<%$ Resources:UIStrings, AddToBundle %>" AssociatedControlID="cboAddResourceID" EnableViewState="False" />
                                <asp:DropDownList ID="cboBulkBundle" runat="server" ValidationGroup="bulkadd" DataSourceID="dsBundles" DataTextField="Name" DataValueField="BundleID" />
                            </div>
                            
                            <div class="actions">
                                <asp:Button ID="btnBulkAdd" runat="server" Text="<%$ Resources:UIStrings, AddElements %>" 
                                    CssClass="uniformbutton btnSave" EnableViewState="False" 
                                    OnClick="btnBulkAdd_Click"
                                    ValidationGroup="bulkadd" />
                                <asp:Button ID="btnAddMoreRows" runat="server" Text="<%$ Resources:UIStrings, AddMoreRows %>" 
                                    CssClass="uniformbutton btnAdd" EnableViewState="False"
                                    ValidationGroup="bulkadd" />
                                <asp:Button ID="btnCancelBulkAdd" runat="server" Text="<%$ Resources:UIStrings, Cancel %>" 
                                    CssClass="uniformbutton btnCancel" EnableViewState="False" 
                                    ValidationGroup="bulkadd" />
                            </div>
                        </div><!-- bulk add -->
                    </ContentTemplate>
                </asp:UpdatePanel>
                <div id="loadingMessage" style="display: none;">
                    <h1><asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:UIStrings, PleaseWait %>" /></h1>
                    <img src="images/ajax-loader.gif" alt="" />
                    <small><asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:UIStrings, NotResponding %>" /><a id="notResponding" href="#"><asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:UIStrings, ClickHereToClose %>" /></a>.</small>
                </div>
                <!-- PO editor -->
                <div id="poedit" class="niceform">
                    <h2><a href="#" class="btnClose">Close</a><asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:UIStrings, EditPOData %>" /></h2>
                    <p><asp:Literal ID="litSourceCommentsInstructions" runat="server" Text="<%$ Resources:UIStrings, OutputFormat %>" /></p>
                    <div class="formrow block">
                        <label for="txtSrcComments"><asp:Literal ID="Literal10" runat="server" Text="<%$ Resources:UIStrings, SourceComments %>" /></label>
                        <textarea id="txtSrcComments" rows="5" cols="40"></textarea>
                    </div>
                    
                    <div class="formrow block">
                        <label for="txtReferences"><asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:UIStrings, References %>" /></label>
                        <textarea id="txtReferences" rows="5" cols="40"></textarea>
                    </div>
                    
                    <div class="formrow block">
                        <label for="txtFlags"><asp:Literal ID="Literal11" runat="server" Text="<%$ Resources:UIStrings, Flags %>" /></label>
                        <textarea id="txtFlags" rows="5" cols="40"></textarea>
                    </div>
                    
                    <div class="formrow block">
                        <label for="txtContext"><asp:Literal ID="Literal12" runat="server" Text="<%$ Resources:UIStrings, Context %>" /></label>
                        <textarea id="txtContext" rows="3" cols="40"></textarea>
                    </div>
                    
                    <div class="actions">
                        <asp:Button ID="btnSavePO" runat="server" Text="<%$ Resources:UIStrings, Save %>" 
                            CssClass="uniformbutton btnSave" EnableViewState="False" 
                            ValidationGroup="editPO" />
                        <asp:Button ID="btnCancelPO" runat="server" Text="<%$ Resources:UIStrings, Cancel %>" 
                            CssClass="uniformbutton btnCancel" EnableViewState="False" 
                            ValidationGroup="editPO" />
                    </div>
                </div>
            </div><!--fullsizeholder-->
        </asp:View>
    </asp:MultiView>
</asp:Content>

